Elementary Applications of Lagrangian Mechanics
This page contains elementary applications of Lagrangian mechanics to simple systems. These systems are difficult to analyze using Newtonian mechanics, but the Lagrangian formalism greatly simplifies the analysis.
Table of Contents
Shortest Path Between Two Points
The shortest path between two points in a plane is a straight line. Can we prove this? This might seem like an insanely obvious statement, but it is nevertheless an interesting subject of study. We can use the Lagrangian formalism to prove this statement.
The key is that the shortest path between two points is the path that minimizes the length of the path.
We can create a path between two points by defining a function
Let the total distance of the path be
where we used the chain rule to write
Since
The first equation gives:
If the derivative of a function is zero, the function is a constant. Therefore, we have:
The same argument for the second equation gives:
Dividing Equation
where
where
Crucially, this proof does not rely on Newtonian mechanics. I made an emphasis on the previous page about deriving the Euler-Lagrange equations without explicitly relying on any specific expression for the Lagrangian. This shows that the equations hold for any Lagrangian, which includes this one for the shortest path.
Double Pendulum
The double pendulum is a simple system that exhibits chaotic behavior. It consists of two pendulums attached to each other, with the second pendulum attached to the first one's bob. We shall derive the equations of motion for the double pendulum using the Lagrangian formalism.
This will be a very long and tedious derivation, so you can skip some of the mathematical details if you want.
The double pendulum consists of two pendulums attached to each other.
The first pendulum has length
If we use Newtonian mechanics, we would have to find all the forces, including the tension in the strings. This is very difficult, as the tension in the strings depends on the angles of the pendulums. We would have to do a lot of vector algebra to find the forces. Instead, we shall use the Lagrangian formalism, which is much simpler for this system because we simply need the energies of the system.
We have two sets of coordinates we can use: the Cartesian coordinates of the bobs or the angles of the pendulums. We can use both for now, but we shall write everything in terms of the angles in the end.
From the figure above, we can derive the following coordinate transformations:
The rates of change of these coordinates are, by the chain rule:
The velocity of the first bob is:
The velocity of the second bob is:
where we used the trigonometric identity
With both velocities, we can find the kinetic energy of the system, which is the sum of the kinetic energies of the bobs:
The potential energy of the system is the sum of the potential energies of the bobs:
With the kinetic and potential energies, we can find the Lagrangian of the system:
Recall that in Lagrangian mechanics, we introduce the canonical momenta conjugate to the generalized coordinates as
Equations of Motion
The equations of motion are given by the Euler-Lagrange equations:
The
The time derivatives of the first conjugate momentum is:
More details, please 🥺
That was a bit complicated and some details were skipped.
The difficult part is the time derivative of the cosine term
First, we need to use the product rule. I have colored the terms to make it easier to see which terms are multiplied together:
Now, we need to find the time derivative of the cosine term.
This is tricky - both
As such, the change in
Putting it all together, we have:
The time derivative of the second conjugate momentum is:
Finally, the partial derivatives of the Lagrangian with respect to the generalized coordinates are:
Putting it all together, the first equation of motion for
Some terms cancel out, and dividing by
The second equation of motion for
Some terms cancel out, and dividing by
As such, we have fully derived the equations of motion for the double pendulum:
These are quite messy at the moment, but we will simplify them (actually, we are just hiding the details) a bit here.
First, let's divide both sides of both equations such that the coefficients of
We shall introduce some auxiliary functions for these coefficients and the terms on the right hand side (which are colored in the equations above):
Then, we can write the equations of motion as:
Using matrices, we can write these equations as a single matrix equation:
Denote the matrix on the left hand side as
It turns out that
Applying
Lastly, we shall write the equations of motion in terms of the angles and their angular velocities. This means that we shall expand our vector to include the angular velocities:
The derivative of
Defining the functions
All of this gives the final equations of motion for the double pendulum:
Equations of Motion for the Double Pendulum: For a double pendulum with masses
where:
and
This equation is nonlinear and there is currently no known general analytical solution for it given any initial conditions.
Of course, some special cases can be solved analytically, but they pertain to specific initial conditions.
For example, the most trivial case is when the pendulums are at rest, i.e.,
The simulation at the top of the page shows the behavior of the double pendulum. It uses a 4th-order Runge-Kutta method to solve the equations of motion numerically. The double pendulum exhibits chaotic behavior, which means that small changes in the initial conditions can lead to drastically different outcomes.
Systems like the double pendulum are very interesting; while they are simple to describe, they exhibit very complex behavior. They are the subject of study in the field of nonlinear dynamics, which studies how systems behave when they are not linear.
Summary and Next Steps
In this section, we have applied the Lagrangian formalism to two systems: the shortest path between two points and the double pendulum.
The shortest path between two points was a simple example to show how the Lagrangian formalism can be used to derive the equations of motion. We showed that the shortest path is a straight line, which is a result that does not rely on Newtonian mechanics.
The double pendulum was a more complex example that showed how the Lagrangian formalism can be used to derive the equations of motion for a system with multiple degrees of freedom. The equations of motion for the double pendulum are nonlinear and exhibit chaotic behavior.
In the next section, we will explore a very important concept in classical mechanics: conservation laws.